]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/bluetooth: Show bluetooth-disabled icon when disabled
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 18 Feb 2022 20:02:20 +0000 (21:02 +0100)
committerMarge Bot <marge-bot@gnome.org>
Wed, 23 Feb 2022 00:15:05 +0000 (00:15 +0000)
We have an icon for this, so let's actually use it.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2186

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2198>

js/ui/status/bluetooth.js

index d84bc3ad5668f61a586f4449a70e0df65fa21806..39c2ab62ca94e40a3b68fdef2c6a9b32b0504c50 100644 (file)
@@ -41,7 +41,6 @@ class Indicator extends PanelMenu.SystemIndicator {
         this._proxy.connect('g-properties-changed', this._queueSync.bind(this));
 
         this._item = new PopupMenu.PopupSubMenuMenuItem(_("Bluetooth"), true);
-        this._item.icon.icon_name = 'bluetooth-active-symbolic';
 
         this._toggleItem = new PopupMenu.PopupMenuItem('');
         this._toggleItem.connect('activate', () => {
@@ -159,6 +158,9 @@ class Indicator extends PanelMenu.SystemIndicator {
         else
             this._item.visible = adapterPowered;
 
+        this._item.icon.icon_name = adapterPowered
+            ? 'bluetooth-active-symbolic' : 'bluetooth-disabled-symbolic';
+
         if (nConnectedDevices > 1)
             /* Translators: this is the number of connected bluetooth devices */
             this._item.label.text = ngettext('%d Connected', '%d Connected', nConnectedDevices).format(nConnectedDevices);